<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(1)
dim fr,id,rs,sql
fr=HTMLEncode(request.querystring("fr"))
id=HTMLEncode(request.querystring("id"))
If id="" Then
	id=0
End If 

Set rs = Server.CreateObject("ADODB.Recordset")
If fr="recordcommentlist" Or fr="recordcommentshow" Then 
	sql = "select * from [c_record_comment] where id="&CInt(id)
Else
	sql = "select * from [c_comment] where id="&CInt(id)
End If 
rs.open sql,conn,1,3
rs("visible")=abs(rs("visible")-1)
rs.update
rs.close
Call redirect(fr,id)

Function redirect(fr,id)
	Dim url
	Select Case fr
		Case "recordcommentlist":
			url="recordcomment_list.asp"
		Case "recordcommentshow":
			url="recordcomment_show.asp?id="&id
		Case "commentlist":
			url="comment_list.asp"
		Case "commentshow":
			url="comment_show.asp?id="&id
	End Select 
	response.redirect(url)
End Function 
%>